﻿using System;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Abp.Application.Services.Dto;
using Abp.Extensions;
using LeadThing.AbpZeroTemplate.SpecialPersons;
using LeadThing.AbpZeroTemplate.EntityFramework;

namespace LeadThing.AbpZeroTemplate.SpecialPersons.EntityMapper.SpecialPersons
{

    /// <summary>
    /// 重点特殊人群的数据配置文件
    /// </summary>
    public class SpecialPersonCfg : EntityTypeConfiguration<SpecialPerson>
    {
        /// <summary>
        ///  构造方法[默认链接字符串< see cref = "AbpZeroTemplateDbContext" /> ]
        /// </summary>
        public SpecialPersonCfg()
        {
            ToTable("SpecialPerson", AbpZeroTemplateConsts.SchemaName.Basic);


            // 人员姓名
            Property(a => a.Name).HasMaxLength(50);
            // 手机号
            Property(a => a.Phone).HasMaxLength(11);
            // 身份证号
            Property(a => a.IDCard).HasMaxLength(18);
            // 民族
            Property(a => a.Nation).HasMaxLength(50);
            // 健康状况
            Property(a => a.Health).HasMaxLength(50);
            // 政治面貌
            Property(a => a.Politics).HasMaxLength(50);
            // 文化程度
            Property(a => a.Culture).HasMaxLength(50);
            // 地址
            Property(a => a.Address).HasMaxLength(500);
        }
    }
}